package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchaseOrderInfoMapper;
import com.ruoyi.system.domain.PurchaseOrderInfo;
import com.ruoyi.system.service.IPurchaseOrderInfoService;

/**
 * 采购单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-14
 */
@Service
public class PurchaseOrderInfoServiceImpl implements IPurchaseOrderInfoService 
{
    @Autowired
    private PurchaseOrderInfoMapper purchaseOrderInfoMapper;

    /**
     * 查询采购单明细
     * 
     * @param id 采购单明细主键
     * @return 采购单明细
     */
    @Override
    public PurchaseOrderInfo selectPurchaseOrderInfoById(Long id)
    {
        return purchaseOrderInfoMapper.selectPurchaseOrderInfoById(id);
    }

    /**
     * 查询采购单明细列表
     * 
     * @param purchaseOrderInfo 采购单明细
     * @return 采购单明细
     */
    @Override
    public List<PurchaseOrderInfo> selectPurchaseOrderInfoList(PurchaseOrderInfo purchaseOrderInfo)
    {
        return purchaseOrderInfoMapper.selectPurchaseOrderInfoList(purchaseOrderInfo);
    }

    /**
     * 新增采购单明细
     * 
     * @param purchaseOrderInfo 采购单明细
     * @return 结果
     */
    @Override
    public int insertPurchaseOrderInfo(PurchaseOrderInfo purchaseOrderInfo)
    {
        return purchaseOrderInfoMapper.insertPurchaseOrderInfo(purchaseOrderInfo);
    }

    /**
     * 修改采购单明细
     * 
     * @param purchaseOrderInfo 采购单明细
     * @return 结果
     */
    @Override
    public int updatePurchaseOrderInfo(PurchaseOrderInfo purchaseOrderInfo)
    {
        return purchaseOrderInfoMapper.updatePurchaseOrderInfo(purchaseOrderInfo);
    }

    /**
     * 批量删除采购单明细
     * 
     * @param ids 需要删除的采购单明细主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderInfoByIds(Long[] ids)
    {
        return purchaseOrderInfoMapper.deletePurchaseOrderInfoByIds(ids);
    }

    /**
     * 删除采购单明细信息
     * 
     * @param id 采购单明细主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderInfoById(Long id)
    {
        return purchaseOrderInfoMapper.deletePurchaseOrderInfoById(id);
    }
}
